package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.List;

@TableName("t_channel")
public class ChannelBean {
    @TableId(value = "pk_channelId",type = IdType.AUTO)
    private Integer id;
    @TableField("c_name")
    private String name;
    @TableField("c_description")
    private String description;
    @TableField(exist = false)
    private Integer postNum;
    @TableField(exist = false)
    private List<PostBean> postList;

    public ChannelBean() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Integer getPostNum() {
        return postNum;
    }

    public void setPostNum(Integer postNum) {
        this.postNum = postNum;
    }

    public List<PostBean> getPostList() {
        return postList;
    }

    public void setPostList(List<PostBean> postList) {
        this.postList = postList;
    }

    @Override
    public String toString() {
        return "ChannelBean{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", description='" + description + '\'' +
                ", postNum" + postNum +
                ", postList=" + postList +
                "}\n";
    }
}

